function xOut=erf(xIn)
  x = xIn.v;
  xOut.v=erf(x);
  d = (2/sqrt(pi))*exp(-x.^2);
  xOut.d = elelmult_splastindx(d,xIn.d);

  xOut=class(xOut,'deriv1s');
